<?php
/**
 * @license http://www.gnu.org/licenses/gpl.html GNU GPL, version 3 or later
 * @package FrontPress
 * @subpackage Thing
 */

/**
 * Implement this interface for any FP_Thing that can have a parent
 * FP_Thing. Classes implementing this will automatically recurse
 * when being used in a breadcrumb.
 *
 * @since 2010-07-29-33
 * @version $Id: interface.fp-thing.php 35 2010-07-30 15:43:41Z Nightgunner5 $
 */
interface FP_Thing_With_Parent {
	/**
	 * Get the parent of an FP_Thing.
	 *
	 * @return FP_Thing|void the parent FP_Thing of this element or
	 *                       null if this is a top-level FP_Thing.
	 */
	function get_parent();
}

/**
 * Implementing this interface will allow an FP_Thing to be used as
 * part of a breadcrumb.
 *
 * @since 2010-07-29-33
 * @version $Id: interface.fp-thing.php 35 2010-07-30 15:43:41Z Nightgunner5 $
 */
interface FP_Thing_Breadcrumb_Link {
	/**
	 * Get the name of an FP_Thing. This is plain text and cannot
	 * contain any formatting.
	 *
	 * @return string the name of this FP_Thing
	 */
	function get_name();

	/**
	 * Get the permalink of an FP_Thing.
	 *
	 * @see frontpress_uri() for an easy method of generating URLs
	 * @return string the permalink for this FP_Thing
	 */
	function get_url();
}